package com.esri.core.tasks.ags.query;

import com.esri.core.internal.tasks.ags.c.f;
import com.esri.core.internal.tasks.ags.c.h;
import com.esri.core.io.EsriSecurityException;
import com.esri.core.io.UserCredentials;
import com.esri.core.map.FeatureSet;
import java.util.Map;

/* loaded from: classes.dex */
public class QueryTask {
    String _url;
    UserCredentials credentials;

    public QueryTask(String str) {
        this._url = str;
    }

    public QueryTask(String str, UserCredentials userCredentials) throws EsriSecurityException {
        this._url = str;
        this.credentials = userCredentials == null ? null : userCredentials.getCopy();
    }

    public FeatureSet execute(Query query) throws Exception {
        return new h(query.getParams(), this._url, this.credentials).execute();
    }

    public Map<Integer, FeatureSet> executeRelationshipQuery(RelationshipQuery relationshipQuery) throws Exception {
        return new f(relationshipQuery.getParams(), this._url, this.credentials).execute();
    }
}
